package com.cnjson.sensor.db.entity;

import java.util.Date;

import com.cnjson.sensor.db.annotation.TableName;
/**
 * 
 * @author lili
 *
 */
@TableName("ift_equipment_status")
public class EquipmentState  extends BaseEntity<EquipmentState>{

	private static final long serialVersionUID = 1L;
	
	private String id;
	private String equipmentId; // 所属设备编号
	private String equipmentName; // 所属设备名称
	private String runningState; // 运行状态
	private Date communicationTime; // 最近通讯时间
	private Date curTime; // 设备当前时间
	private String timeState; // 时间状态
	private String heartbeatType; // 心跳类型
	private String linkType; // 连接方式
	private String signalIntensity; // 信号强度
	private String reportingCycle; // 上报周期
	private String acquisionCycle; // 采集周期
	private String storageCycle; // 存储周期
	private int storedData; // 存储数据
	private int unreportedData; // 未报数据
	private float equipmentEnergy; // 设备能量
	private String remoteAddress;//IP
	private String createBy;
	private Date createDate;
	private String updateBy;
	private Date updateDate;
	private String remarks;
	private String delFlag;

	public EquipmentState() {
	}
	
	public EquipmentState(String id, String equipmentId, String runningState, Date curTime, Date communicationTime, Date createDate, Date updateDate, String delFlag, String remoteAddress) {
		this.id = id;
		this.equipmentId = equipmentId;
		this.runningState = runningState;
		this.curTime = curTime;
		this.communicationTime = communicationTime;
		this.createDate = createDate;
		this.updateDate = updateDate;
		this.delFlag = delFlag;
		this.remoteAddress = remoteAddress;
		this.signalIntensity = "";
		this.heartbeatType = "";
		this.linkType = "";
		this.reportingCycle = "";
		this.acquisionCycle = "";
		this.storageCycle = "";
		this.storedData = 0;
		this.unreportedData = 0;
		this.equipmentEnergy = 0.0f;
		this.createBy = "";
		this.updateBy = "";

	}

	public EquipmentState(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	// @Length(min=1, max=50, message="所属设备编号长度必须介于 1 和 50 之间")
	public String getEquipmentId() {
		return equipmentId;
	}

	public void setEquipmentId(String equipmentId) {
		this.equipmentId = equipmentId;
	}

	// @Length(min=0, max=50, message="运行状态长度必须介于 0 和 50 之间")
	public String getRunningState() {
		return runningState;
	}

	public void setRunningState(String runningState) {
		this.runningState = runningState;
	}

	// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCommunicationTime() {
		return communicationTime;
	}

	public void setCommunicationTime(Date communicationTime) {
		this.communicationTime = communicationTime;
	}

	// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCurTime() {
		return curTime;
	}

	public void setCurTime(Date currentTime) {
		this.curTime = currentTime;
	}

	// @Length(min=0, max=50, message="时间状态长度必须介于 0 和 50 之间")
	public String getTimeState() {
		return timeState;
	}

	public void setTimeState(String timeState) {
		this.timeState = timeState;
	}

	// @Length(min=0, max=50, message="信号强度长度必须介于 0 和 50 之间")
	public String getSignalIntensity() {
		return signalIntensity;
	}

	public void setSignalIntensity(String signalIntensity) {
		this.signalIntensity = signalIntensity;
	}

	public String getEquipmentName() {
		return equipmentName;
	}

	public void setEquipmentName(String equipmentName) {
		this.equipmentName = equipmentName;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getHeartbeatType() {
		return heartbeatType;
	}

	public void setHeartbeatType(String heartbeatType) {
		this.heartbeatType = heartbeatType;
	}

	public String getLinkType() {
		return linkType;
	}

	public void setLinkType(String linkType) {
		this.linkType = linkType;
	}

	public String getReportingCycle() {
		return reportingCycle;
	}

	public void setReportingCycle(String reportingCycle) {
		this.reportingCycle = reportingCycle;
	}

	public String getAcquisionCycle() {
		return acquisionCycle;
	}

	public void setAcquisionCycle(String acquisionCycle) {
		this.acquisionCycle = acquisionCycle;
	}

	public String getStorageCycle() {
		return storageCycle;
	}

	public void setStorageCycle(String storageCycle) {
		this.storageCycle = storageCycle;
	}

	public int getStoredData() {
		return storedData;
	}

	public void setStoredData(int storedData) {
		this.storedData = storedData;
	}

	public int getUnreportedData() {
		return unreportedData;
	}

	public void setUnreportedData(int unreportedData) {
		this.unreportedData = unreportedData;
	}

	public float getEquipmentEnergy() {
		return equipmentEnergy;
	}

	public void setEquipmentEnergy(float equipment_energy) {
		this.equipmentEnergy = equipment_energy;
	}
	
	public String getRemoteAddress() {
		return remoteAddress;
	}

	public void setRemoteAddress(String remoteAddress) {
		this.remoteAddress = remoteAddress;
	}

	@Override
	public String toString() {
		return "EquipmentState{" +
				"id='" + id + '\'' +
				", equipmentId='" + equipmentId + '\'' +
				", equipmentName='" + equipmentName + '\'' +
				", runningState='" + runningState + '\'' +
				", communicationTime=" + communicationTime +
				", curTime=" + curTime +
				", timeState='" + timeState + '\'' +
				", heartbeatType='" + heartbeatType + '\'' +
				", linkType='" + linkType + '\'' +
				", signalIntensity='" + signalIntensity + '\'' +
				", reportingCycle='" + reportingCycle + '\'' +
				", acquisionCycle='" + acquisionCycle + '\'' +
				", storageCycle='" + storageCycle + '\'' +
				", storedData=" + storedData +
				", unreportedData=" + unreportedData +
				", equipmentEnergy=" + equipmentEnergy +
				", remoteAddress='" + remoteAddress + '\'' +
				", createBy='" + createBy + '\'' +
				", createDate=" + createDate +
				", updateBy='" + updateBy + '\'' +
				", updateDate=" + updateDate +
				", remarks='" + remarks + '\'' +
				", delFlag='" + delFlag + '\'' +
				'}';
	}
}